package cn.pupil.springframework.core.convert.support;

import cn.pupil.springframework.core.convert.converter.ConverterRegistry;

/**
 * @Description: 默认类型转换服务
 * @Author: pupil
 * @Date: 2024/12/16 下午 4:56
 */
public class DefaultConversionService extends GenericConversionService {

    public DefaultConversionService() {
        addDefaultConverters(this);
    }

    public static void addDefaultConverters(ConverterRegistry converterRegistry){
        // 添加各类类型转换工厂
        converterRegistry.addConverterFactory(new StringToNumberConverterFactory());
    }
}
